package entity

import (
	"shqsoft.cn/pasnj/base"

	"time"

	"github.com/jinzhu/gorm"
)

type CompAccoInrtDtip struct {
	ID   int       `gorm:"AUTO_INCREMENT;primary_key;column:ID"`
	ACNO string    `gorm:"column:ACNO"`
	CUNM string    `gorm:"column:CUNM"`
	OPDT time.Time `gorm:"column:OPDT;type:date"`
	ACBL float64   `gorm:"column:ACBL"`
	AVVL float64   `gorm:"column:AVVL"`
	INRT float64   `gorm:"column:INRT"`
	VLDT time.Time `gorm:"column:VLDT;type:date"`
	MODT time.Time `gorm:"column:MODT;type:date"`
	DRJG string    `gorm:"column:DRJG"`
}

func (CompAccoInrtDtip) TableName() string {
	return "T_COMP_ACCO_JGX_CK_INRT_DTIP"
}

//导入后执行分户处理
func CompAccoInrtAfterImport(tx *gorm.DB, params map[string]string) (err error) {
	tx.Exec("exec UP_COMP_ACCO_INRT_INS")
	return nil
}

func CompAccoInrtDtipEF() base.EntityFunc {
	return func() interface{} {
		entity := CompAccoInrtDtip{}
		return &entity
	}
}
func CompAccoInrtDtipESF() base.EntitiesFunc {
	return func() interface{} {
		var entities []CompAccoInrtDtip
		return &entities
	}
}

func init() {
	base.DaoPoolObj.Put("CompAccoInrtDtip", base.NewDefaultDao(CompAccoInrtDtipEF(), CompAccoInrtDtipESF(), nil))
	base.SetAfterCallBack("CompAccoInrtDtip", CompAccoInrtAfterImport)
}
